<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>你好B站的小伙伴们</h1>
测试REST风格
<form action="/user" method="get">
    <input value="REST-GET 提交" type="submit">
</form>
<form action="/user" method="post">
    <input value="REST-POST 提交" type="submit">
</form>
<form action="/user" method="post">
    <input name="_method" type="hidden" value="PUT">
    <input value="REST-PUT 提交" type="submit">
</form>
<form action="/user" method="post">
    <input name="_method" type="hidden" value="DELETE">
    <input value="REST-DELETE 提交" type="submit">
</form>

<hr>
测试基本注解
<ul>
    <a href="/car/3/owner/lisi?age=18&inters=basketball&hobby=game">/car/{id}/owner/{username}</a>
    <li>@PathVariable(路径变量)</li>
    <li>@RequestHeader(获取请求头)</li>
    <li>@RequestParam(获取请求参数)</li>
    <li>@CookieValue(获取cookie值)</li>
    <li>@RequestAttribute(获取request域属性)</li>
    <li>@RequestBody(获取请求体)</li>
    <li>@MatrixVariable(矩阵变量)</li>
</ul>

/cars/{path}?xxx=xxx&aaa=ccc queryString 查询字符串@ReustParam<br>
/cars/{sell;low=34;brand=byd,audi,yd} ; 矩阵变量<br>

页面开发，cookie禁用了， session里面的内容怎么使用？<br>
session.set(a,b)---->jsessionid---->cookie--->每次发请求携带cookie<br>
url重写： /abc;jsessionid=xxxx 把cookies值使用矩阵变量的方式进行传递<br>


/boss/1/2<br>
/boss/1;age=20/2;age=23<br>
<a href="/cars/sell;low=34;brand=byd,audi,yd">@MatrixVariable(矩阵变量)</a>
<a href="/cars/sell;low=34;brand=byd;brand=audi;brand=yd">@MatrixVariable(矩阵变量)</a>
<a href="boss/1;age=20/2;age=10">@MatrixVariable(矩阵变量)</a>
<br>
<form action="/save" method="post">
    测试@RequestBody获取数据<br>
    用户名:<input name="userName"><br>
    邮箱：<input name="email">
    <input type="submit" value="提交">
</form>
<ol>
    <li>矩阵变量需要在spring中手动开启</li>
    <li>矩阵变量需要在spring中手动开启</li>
</ol>

<a href="/testapi">测试原生api</a>
<hr>
测试复杂类型<hr>
<form action="/saveuser" method="post">
    姓名：<input name="userName" value="zhansan"><br>
    年龄：<input name="age" value="20"><br>
    生日：<input name="birth" value="1999/12/1"><br>
    宠物名：<input name="pet.name" value="car.."><br>
    宠物年龄：<input name="pet.age" value="3"><br>
    <input type="submit" value="保存">
</form>

</body>
</html>